<?php

class Core_Form_Admin_Appearance_Block extends Form
{
	function init()
	{
		$this -> addChild('text', 'region', array(
			'rules' => 'required',
			'value' => 'content',
			'label' => 'Region',
		));

		$this -> addChild('select', 'path', array(
			'label' => 'Path',
			'multiOptions' => Model::getTable('core.appearance.element') -> getMultiOptions()
		));

		$this -> addChild('text', 'parent_id', array('label' => 'Parent ID'));

		$this -> addChild('text', 'sort_order', array(
			'label' => 'Sort Order',
			'required' => true,
			'rules' => 'required',
			'value' => 99,
		));

		$this -> addChild('yesno', 'is_active', array(
			'label' => 'Active',
			'required' => true,
			'rules' => 'required',
			'value' => 1,
		));

		$this -> addChild('yesno', 'is_locked', array(
			'label' => 'Lock',
			'required' => true,
			'rules' => 'required',
			'value' => 1,
		));

		$this -> addChild('group', '_buttons');
		$this -> _buttons -> addChild('submit', '_submit') -> addChild('cancel', '_cancel');
	}

}
